package org.csu.controller;

import org.csu.pojo.User;
import org.csu.service.UserProfileService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;

import javax.annotation.Resource;

@Controller(value="UserProfileController")
public class UserProfileController {
    @Resource(name="userProfileService")
    private UserProfileService userProfileService;
    public Boolean getProfile(Integer userId, Model model) {
        return userProfileService.getProfile(userId, model);
    }
    public Boolean updateProfile(User user) {
        return userProfileService.updateProfile(user);
    }
    public Boolean changePassword(String request) {
        return userProfileService.changePassword(request);
    }
    public String uploadAvatar(String file){
        return userProfileService.uploadAvatar(file);
    }
}
